-- GENERATED SPELL FOR [Reanimated Captain] --


function spell0_30986(pUnit, Event) --@Avenger\'s Shield,n/a--
pUnit:FullCastSpellOnTarget(32674,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30986', 7000, 1)
end

function spell1_30986(pUnit, Event) --@Hammer of Injustice,n/a--
pUnit:FullCastSpellOnTarget(58154,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30986', 6297, 1)
end

function spell2_30986(pUnit, Event) --@Unholy Light,Heal--
pUnit:FullCastSpellOnTarget(58153,pUnit)
pUnit:RegisterEvent('Sorts_30986', 2500, 1)
end

function Sorts_30986(pUnit, Event)
local choix_sorts_30986 = math.random(0, 2)
if choix_sorts_30986 == 0 then
pUnit:RegisterEvent('spell0_30986', 1, 1)
end
if choix_sorts_30986 == 1 then
pUnit:RegisterEvent('spell1_30986', 1, 1)
end
if choix_sorts_30986 == 2 then
pUnit:RegisterEvent('spell2_30986', 1, 1)
end
end

function mob30986_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30986', math.random(1500, 3000), 1)
end

function mob30986_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30986_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30986_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30986, 1, 'mob30986_Action')
RegisterUnitEvent(30986, 2, 'mob30986_Leave')
RegisterUnitEvent(30986, 3, 'mob30986_Kill')
RegisterUnitEvent(30986, 4, 'mob30986_Die')
